home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Developer Toolbox 6.1
/
SGI Developer Toolbox 6.1 - Disc 4.iso
/
public
/
bit
/
src
/
paint.h
< prev
next >
Wrap
C/C++ Source or Header
|
1994-08-01
|
8KB
|
202 lines
/*
* $Id: paint.h,v 0.91 1994/02/20 00:53:42 zhao Pre-Release $
*
*. This file is part of BIT shareware package. After the two weeks of
* free evaluation period, you are encouraged (required) to register
* your copy for a small registration fee, which is $35 for personal use
* and $50 for commercial, government and institutional use.
*
* Copyright(c) 1993, 1994 by T.C. Zhao.
* All rights reserved.
*
* Permission to use, copy, and distribute this software in its entirety
* for non-commercial purposes is hereby granted, provided that the
* above shareware and copyright notices and this permission notice
* appear in all copies and their documentation.
*
* This software may be modified for your own use, but modified versions
* may not be distributed without prior consent of the author.
*
* This software is provided "as is" without expressed or implied
* warranty of any kind.
*
*.
*
*/
#ifndef PAINT_H_
#define PAINT_H_
#ifdef PAINT_DRIVER
#define BITMAP_W 30
#define BITMAP_H 30
#if 0
static char curve_bits[] =
{
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x80, 0x0f, 0x00, 0x08, 0xc0, 0x1f, 0x00, 0x1c,
0x60, 0x38, 0x00, 0x0e, 0x70, 0x70, 0x00, 0x07, 0x30, 0x60, 0x80, 0x03,
0x18, 0xc0, 0xc0, 0x01, 0x18, 0xc0, 0xe0, 0x00, 0x0c, 0xc0, 0x70, 0x00,
0x0c, 0xc0, 0x30, 0x00, 0x0c, 0x80, 0x19, 0x00, 0x0c, 0x80, 0x1f, 0x00,
0x0c, 0x00, 0x0f, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
#endif
static char arc_bits[] =
{
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0xff, 0x7f, 0x00,
0xc0, 0x07, 0xf0, 0x01, 0xe0, 0x00, 0x80, 0x03, 0x38, 0x00, 0x00, 0x0e,
0x1c, 0x00, 0x00, 0x1c, 0x18, 0x00, 0x00, 0x0c, 0x30, 0x00, 0x00, 0x06,
0x60, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x80, 0x01, 0x80, 0x01, 0xc0, 0x00,
0x00, 0x03, 0x60, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x0c, 0x18, 0x00,
0x00, 0x18, 0x0c, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 0x60, 0x03, 0x00,
0x00, 0xc0, 0x01, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
static char ray_bits[] =
{
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xc0, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x03, 0x60, 0xc0, 0x80, 0x03,
0xe0, 0xc0, 0xc0, 0x01, 0xc0, 0xc1, 0xe0, 0x00, 0x80, 0xc3, 0x70, 0x00,
0x00, 0xc7, 0x38, 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, 0xdc, 0x0e, 0x00,
0x00, 0xf8, 0x07, 0x00, 0x00, 0xf0, 0x03, 0x00, 0xf8, 0xff, 0xff, 0x0f,
0xf8, 0xff, 0xff, 0x0f, 0x00, 0xf0, 0x03, 0x00, 0x00, 0xf8, 0x07, 0x00,
0x00, 0xdc, 0x0e, 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, 0xc7, 0x38, 0x00,
0x80, 0xc3, 0x70, 0x00, 0xc0, 0xc1, 0xe0, 0x00, 0xe0, 0xc0, 0xc0, 0x01,
0x70, 0xc0, 0x80, 0x03, 0x20, 0xc0, 0x00, 0x01, 0x00, 0xc0, 0x00, 0x00,
0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
static char line_bits[] =
{
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
0x1c, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00,
0xe0, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00,
0x00, 0x07, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00,
0x00, 0x38, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00,
0x00, 0xc0, 0x01, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00,
0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x38, 0x00,
0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0xc0, 0x01,
0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0e,
0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
static char fpoly_bits[] =
{
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x3c, 0x00, 0x3e, 0x00,
0x7c, 0x00, 0x67, 0x00, 0xcc, 0x81, 0xc3, 0x00, 0x8c, 0xc7, 0x81, 0x01,
0x0c, 0xfe, 0x00, 0x03, 0x0c, 0x38, 0x00, 0x07, 0x0c, 0x00, 0x00, 0x06,
0x0c, 0x00, 0x00, 0x06, 0x0c, 0x00, 0x00, 0x06, 0x0c, 0x00, 0x00, 0x06,
0x0c, 0x00, 0x00, 0x06, 0x0c, 0x00, 0x00, 0x06, 0x0c, 0x00, 0x00, 0x06,
0x0c, 0x00, 0x00, 0x06, 0x0c, 0x00, 0x00, 0x06, 0x0c, 0x00, 0x00, 0x06,
0x0c, 0x00, 0x00, 0x06, 0xfc, 0xff, 0xff, 0x07, 0xfc, 0xff, 0xff, 0x07,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
static char circ_bits[] =
{
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x07, 0x00, 0x00, 0xfe, 0x3f, 0x00,
0x00, 0x0d, 0x58, 0x00, 0xc0, 0x03, 0xe0, 0x01, 0xa0, 0x00, 0x80, 0x02,
0x60, 0x00, 0x00, 0x03, 0x30, 0x00, 0x00, 0x06, 0x28, 0x00, 0x00, 0x0a,
0x18, 0x00, 0x00, 0x0c, 0x18, 0x00, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x18,
0x0c, 0x00, 0x00, 0x18, 0x0c, 0x00, 0x00, 0x18, 0x0c, 0x80, 0x00, 0x18,
0x0c, 0x00, 0x00, 0x18, 0x0c, 0x00, 0x00, 0x18, 0x0c, 0x00, 0x00, 0x18,
0x18, 0x00, 0x00, 0x0c, 0x18, 0x00, 0x00, 0x0c, 0x28, 0x00, 0x00, 0x0a,
0x30, 0x00, 0x00, 0x06, 0x60, 0x00, 0x00, 0x03, 0xa0, 0x00, 0x80, 0x02,
0xc0, 0x03, 0xe0, 0x01, 0x00, 0x0d, 0x58, 0x00, 0x00, 0xfe, 0x3f, 0x00,
0x00, 0xf0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
static char rec_bits[] =
{
0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x1f, 0xfe, 0xff, 0xff, 0x1f,
0x06, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00, 0x18,
0x06, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00, 0x18,
0x06, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00, 0x18,
0x06, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00, 0x18,
0x06, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00, 0x18,
0x06, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00, 0x18,
0x06, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00, 0x18,
0x06, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00, 0x18,
0xfe, 0xff, 0xff, 0x1f, 0xfe, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00
};
/**** All patterns ********/
#include "bitmaps/pat_solid.xbm"
#include "bitmaps/pat_hollow.xbm"
#include "bitmaps/pat_chess.xbm"
#include "bitmaps/pat_ichess.xbm"
#include "bitmaps/pat_checker4.xbm"
#include "bitmaps/pat_icirc2.xbm"
#include "bitmaps/pat_circ2.xbm"
#include "bitmaps/pat_rcirc.xbm"
#include "bitmaps/pat_grid32.xbm"
#include "bitmaps/pat_grid32x.xbm"
#include "bitmaps/pat_grid16.xbm"
#include "bitmaps/pat_dots.xbm"
#include "bitmaps/pat_rdots.xbm"
#include "bitmaps/pat_griddots.xbm"
#include "bitmaps/pat_rhash.xbm"
#include "bitmaps/pat_lhash.xbm"
#include "bitmaps/pat_vhash.xbm"
#include "bitmaps/pat_hhash.xbm"
#include "bitmaps/pat_hvhash.xbm"
#include "bitmaps/pat_fcc.xbm"
#include "bitmaps/pat_sqctr.xbm"
#include "bitmaps/pat_heart.xbm"
#include "bitmaps/pat_lbrick.xbm"
#include "bitmaps/pat_lfbrick.xbm"
#include "bitmaps/pat_dn.xbm"
#include "bitmaps/pat_rough.xbm"
#endif /* PAINT_DRIVER */
/** constant and structs *****/
enum
{
PAT_SOLID, PAT_HOLLOW,
PAT_RHASH, PAT_LHASH, PAT_VHASH, PAT_HHASH, PAT_HVHASH,
PAT_CHESS, PAT_ICHESS, PAT_CHECKER4,
PAT_GRID32, PAT_GRID32X, PAT_GRID16,
PAT_CIRC, PAT_ICIRC, PAT_RAN_CIRC,
PAT_DOTS, PAT_RAN_DOTS, PAT_GRID_DOTS,
PAT_HEARTS, PAT_FCC, PAT_SQCTR,
PAT_LBRICK, PAT_LFBRICK,
PAT_DN, PAT_ROUGH,
/* must leave free as the last two */
PAT_FREE1, PAT_FREE2
};
typedef struct
{
int name;
int size;
char *mask;
}
Pattern_t;
#endif